class Student(object):
    count = 0
    def __init__(self, name):
        self.name = name
        Student.count += 1#count为类属性，所有实例都可访问。此处的Student.count指明了是类属性

        

if Student.count != 0:
    print('测试失败!1')
else:
    bart = Student('Bart')
    if Student.count != 1:
        print('测试失败!2',bart.count)
    else:
        lisa = Student('Bart')
        if Student.count != 2:
            print('测试失败!3')
        else:
            print('Students:', Student.count)
            print('测试通过!4')








